package com.such.kit.calendar.period.impl;

import java.text.ParseException;
import com.such.kit.calendar.DateCalculate;
import com.such.kit.calendar.DatePeriodHelper;
import com.such.kit.calendar.period.DatePeriod;

public class DayPeriod extends DatePeriod {

	public DatePeriod add(int amount) throws ParseException {
		return DatePeriodHelper.getInstance(DatePeriodHelper.FREQ_DAY, 
				super.sfd.format(DateCalculate.add(super.date, amount, DateCalculate.UNIT_DAY)), super.format);
	}

	public DatePeriod subtract(int amount) throws ParseException {
		return DatePeriodHelper.getInstance(DatePeriodHelper.FREQ_DAY, 
				super.sfd.format(DateCalculate.subtract(super.date, amount, DateCalculate.UNIT_DAY)), super.format);
	}

	public String firstFreqDay() {
		return getDateString();
	}

	public String lastFreqDay() {
		return getDateString();
	}

}
